import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/supplier/business/businessMain/` + url, ...arg)

/**
 * 业务主表Api接口管理器
 *
 * @author Mr.wu
 * @date  2025/03/26 11:03
 **/
export default {
	// 获取业务主表分页
	supplierBusinessMainPage(data) {
		return request('page', data, 'get')
	},
	// 提交业务主表表单 edit为true时为编辑，默认为新增
	supplierBusinessMainSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除业务主表
	supplierBusinessMainDelete(data) {
		return request('delete', data)
	},
	// 获取业务主表详情
	supplierBusinessMainDetail(data) {
		return request('detail', data, 'get')
	},
	// 作废业务主表
	supplierBusinessMainCancel(data) {
		return request('cancel', data)
	},
	// 查询待结算业务主表分页
	supplierBusinessMainPendingPage(data) {
		return request('pendingPage', data, 'get')
	},
}
